package cn.ito.zjgsu.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class NoteExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public NoteExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andNoteIdIsNull() {
            addCriterion("note_id is null");
            return (Criteria) this;
        }

        public Criteria andNoteIdIsNotNull() {
            addCriterion("note_id is not null");
            return (Criteria) this;
        }

        public Criteria andNoteIdEqualTo(Integer value) {
            addCriterion("note_id =", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdNotEqualTo(Integer value) {
            addCriterion("note_id <>", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdGreaterThan(Integer value) {
            addCriterion("note_id >", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("note_id >=", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdLessThan(Integer value) {
            addCriterion("note_id <", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdLessThanOrEqualTo(Integer value) {
            addCriterion("note_id <=", value, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdIn(List<Integer> values) {
            addCriterion("note_id in", values, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdNotIn(List<Integer> values) {
            addCriterion("note_id not in", values, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdBetween(Integer value1, Integer value2) {
            addCriterion("note_id between", value1, value2, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteIdNotBetween(Integer value1, Integer value2) {
            addCriterion("note_id not between", value1, value2, "noteId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdIsNull() {
            addCriterion("note_project_id is null");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdIsNotNull() {
            addCriterion("note_project_id is not null");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdEqualTo(Integer value) {
            addCriterion("note_project_id =", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdNotEqualTo(Integer value) {
            addCriterion("note_project_id <>", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdGreaterThan(Integer value) {
            addCriterion("note_project_id >", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("note_project_id >=", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdLessThan(Integer value) {
            addCriterion("note_project_id <", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdLessThanOrEqualTo(Integer value) {
            addCriterion("note_project_id <=", value, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdIn(List<Integer> values) {
            addCriterion("note_project_id in", values, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdNotIn(List<Integer> values) {
            addCriterion("note_project_id not in", values, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdBetween(Integer value1, Integer value2) {
            addCriterion("note_project_id between", value1, value2, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteProjectIdNotBetween(Integer value1, Integer value2) {
            addCriterion("note_project_id not between", value1, value2, "noteProjectId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdIsNull() {
            addCriterion("note_type_id is null");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdIsNotNull() {
            addCriterion("note_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdEqualTo(Integer value) {
            addCriterion("note_type_id =", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdNotEqualTo(Integer value) {
            addCriterion("note_type_id <>", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdGreaterThan(Integer value) {
            addCriterion("note_type_id >", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("note_type_id >=", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdLessThan(Integer value) {
            addCriterion("note_type_id <", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("note_type_id <=", value, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdIn(List<Integer> values) {
            addCriterion("note_type_id in", values, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdNotIn(List<Integer> values) {
            addCriterion("note_type_id not in", values, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("note_type_id between", value1, value2, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("note_type_id not between", value1, value2, "noteTypeId");
            return (Criteria) this;
        }

        public Criteria andNoteContentIsNull() {
            addCriterion("note_content is null");
            return (Criteria) this;
        }

        public Criteria andNoteContentIsNotNull() {
            addCriterion("note_content is not null");
            return (Criteria) this;
        }

        public Criteria andNoteContentEqualTo(String value) {
            addCriterion("note_content =", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentNotEqualTo(String value) {
            addCriterion("note_content <>", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentGreaterThan(String value) {
            addCriterion("note_content >", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentGreaterThanOrEqualTo(String value) {
            addCriterion("note_content >=", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentLessThan(String value) {
            addCriterion("note_content <", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentLessThanOrEqualTo(String value) {
            addCriterion("note_content <=", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentLike(String value) {
            addCriterion("note_content like", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentNotLike(String value) {
            addCriterion("note_content not like", value, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentIn(List<String> values) {
            addCriterion("note_content in", values, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentNotIn(List<String> values) {
            addCriterion("note_content not in", values, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentBetween(String value1, String value2) {
            addCriterion("note_content between", value1, value2, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNoteContentNotBetween(String value1, String value2) {
            addCriterion("note_content not between", value1, value2, "noteContent");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdIsNull() {
            addCriterion("note_person_id is null");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdIsNotNull() {
            addCriterion("note_person_id is not null");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdEqualTo(Integer value) {
            addCriterion("note_person_id =", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdNotEqualTo(Integer value) {
            addCriterion("note_person_id <>", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdGreaterThan(Integer value) {
            addCriterion("note_person_id >", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("note_person_id >=", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdLessThan(Integer value) {
            addCriterion("note_person_id <", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdLessThanOrEqualTo(Integer value) {
            addCriterion("note_person_id <=", value, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdIn(List<Integer> values) {
            addCriterion("note_person_id in", values, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdNotIn(List<Integer> values) {
            addCriterion("note_person_id not in", values, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdBetween(Integer value1, Integer value2) {
            addCriterion("note_person_id between", value1, value2, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNotePersonIdNotBetween(Integer value1, Integer value2) {
            addCriterion("note_person_id not between", value1, value2, "notePersonId");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeIsNull() {
            addCriterion("note_type_createtime is null");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeIsNotNull() {
            addCriterion("note_type_createtime is not null");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeEqualTo(Date value) {
            addCriterion("note_type_createtime =", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeNotEqualTo(Date value) {
            addCriterion("note_type_createtime <>", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeGreaterThan(Date value) {
            addCriterion("note_type_createtime >", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("note_type_createtime >=", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeLessThan(Date value) {
            addCriterion("note_type_createtime <", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeLessThanOrEqualTo(Date value) {
            addCriterion("note_type_createtime <=", value, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeIn(List<Date> values) {
            addCriterion("note_type_createtime in", values, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeNotIn(List<Date> values) {
            addCriterion("note_type_createtime not in", values, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeBetween(Date value1, Date value2) {
            addCriterion("note_type_createtime between", value1, value2, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteTypeCreatetimeNotBetween(Date value1, Date value2) {
            addCriterion("note_type_createtime not between", value1, value2, "noteTypeCreatetime");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsIsNull() {
            addCriterion("note_delete_tags is null");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsIsNotNull() {
            addCriterion("note_delete_tags is not null");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsEqualTo(Boolean value) {
            addCriterion("note_delete_tags =", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsNotEqualTo(Boolean value) {
            addCriterion("note_delete_tags <>", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsGreaterThan(Boolean value) {
            addCriterion("note_delete_tags >", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsGreaterThanOrEqualTo(Boolean value) {
            addCriterion("note_delete_tags >=", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsLessThan(Boolean value) {
            addCriterion("note_delete_tags <", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsLessThanOrEqualTo(Boolean value) {
            addCriterion("note_delete_tags <=", value, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsIn(List<Boolean> values) {
            addCriterion("note_delete_tags in", values, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsNotIn(List<Boolean> values) {
            addCriterion("note_delete_tags not in", values, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsBetween(Boolean value1, Boolean value2) {
            addCriterion("note_delete_tags between", value1, value2, "noteDeleteTags");
            return (Criteria) this;
        }

        public Criteria andNoteDeleteTagsNotBetween(Boolean value1, Boolean value2) {
            addCriterion("note_delete_tags not between", value1, value2, "noteDeleteTags");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}